import request from "../utils/request";
//获取列表
export function getList(params) {
  return request({
    url: "/data",
    method: "GET",
    params,
  });
}
// 新增
export function IncreaseTask(data) {
  return request({
    url: "/data",
    method: "POST",
    data,
  });
}
//删除
export function deleteTask(id) {
  return request({
    url: `data/${id}`,
    method: "DELETE",
  });
}
// 编辑
export function ReviseTask(data) {
  return request({
    url: `data/${data.id}`,
    method: "PUT",
    data,
  });
}
//回显
export function getTask(id) {
  return request({
    url: `data/${id}`,
    method: "GET",
  });
}
// 搜索
export function searchTask(name) {
  return request({
    url: "/data",
    method: "GET",
    params: name,
  });
}
